//
//  IncomeDetailNextViewController.m
//  fxxiaoke
//
//  Created by 鞠超 on 16/9/27.
//  Copyright © 2016年 jc. All rights reserved.
//

#import "IncomeDetailNextViewController.h"

@interface IncomeDetailNextViewController () <UIScrollViewDelegate>

@property (nonatomic, strong) UIScrollView * scrollView;
//
@property (nonatomic, strong) UILabel * lbl_price;
@property (nonatomic, strong) UILabel * lbl_type;
@property (nonatomic, strong) UILabel * lbl_status;
@property (nonatomic, strong) UILabel * lbl_time;
@property (nonatomic, strong) UILabel * lbl_Payment;
@property (nonatomic, strong) UILabel * lbl_number;

@end

@implementation IncomeDetailNextViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self p_navi];
    
    [self p_setupView];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark - navi
- (void )p_navi
{
    _btnLeft.hidden = YES;
    _lblLeft.hidden = YES;
    _btnRight.hidden = YES;
    _lblRight.hidden = YES;
    
    _lblTitle.text = @"收支明细详情";
    
    //左返回
    UIImageView * image_LeftRetrun = [[UIImageView alloc] initWithFrame:CGRectMake(11, 31.5, 25, 25)];
    image_LeftRetrun.userInteractionEnabled = YES;
    image_LeftRetrun.image = [UIImage imageNamed:@"Left-return.png"];
    [_topView addSubview:image_LeftRetrun];
    
    UILabel * lbl_return = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(image_LeftRetrun.frame) - 6, 35, 35, 15)];
    lbl_return.text = @"返回";
    lbl_return.textColor = [UIColor whiteColor];
    lbl_return.font = [UIFont systemFontOfSize:17];
    [_topView addSubview:lbl_return];
    
    UIButton * btn_return = [UIButton buttonWithType:(UIButtonTypeSystem)];
    btn_return.frame = CGRectMake(10, 22, 60, 40);
    [_topView addSubview:btn_return];
    [btn_return addTarget:self action:@selector(btn_returnAction:) forControlEvents:(UIControlEventTouchUpInside)];
}

//左返回
- (void )btn_returnAction:(UIButton *)sender
{
    [self.navigationController popViewControllerAnimated:YES];
}

//显示tabbar
- (void )viewWillAppear:(BOOL)animated
{
    [(AppDelegate *)[[UIApplication sharedApplication] delegate] hiddenTabBar];
}

#pragma mark - 布局
- (void )p_setupView
{    
    self.view.backgroundColor = [UIColor whiteColor];
    
    self.scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 64, SCREEN_WIDTH, SCREEN_HEIGHT - 64)];
    self.scrollView.backgroundColor = [UIColor whiteColor];
    self.scrollView.showsVerticalScrollIndicator = NO;
    self.scrollView.contentSize = CGSizeMake(0, SCREEN_HEIGHT - 60);
    self.scrollView.delegate = self;
    [self.view addSubview:self.scrollView];
    
    //金额
    UILabel * placehold_price = [[UILabel alloc] initWithFrame:CGRectMake(15, 15, (SCREEN_WIDTH - 30) / 2, 15)];
    placehold_price.text = @"金额";
    placehold_price.font = [UIFont systemFontOfSize:18.0f];
    placehold_price.textColor = [UIColor blackColor];
    [self.scrollView addSubview:placehold_price];
    
    self.lbl_price = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(placehold_price.frame), 15, (SCREEN_WIDTH - 30) / 2, 15)];
    self.lbl_price.text = @"+0.70";
    self.lbl_price.textAlignment = NSTextAlignmentRight;
    self.lbl_price.textColor = [UIColor colorWithRed:90/255.0 green:167/255.0 blue:239/255.0 alpha:1.0];
    [self.scrollView addSubview:self.lbl_price];
    
    UIView * view_line = [[UIView alloc] initWithFrame:CGRectMake(8, CGRectGetMaxY(placehold_price.frame) + 15, SCREEN_WIDTH - 8, 1)];
    view_line.backgroundColor = [UIColor groupTableViewBackgroundColor];
    [self.scrollView addSubview:view_line];
    
    //类型
    UILabel * placehold_type = [[UILabel alloc] initWithFrame:CGRectMake(15, CGRectGetMaxY(view_line.frame) + 15, (SCREEN_WIDTH - 30) / 2, 15)];
    placehold_type.text = @"类型";
    placehold_type.font = [UIFont systemFontOfSize:16.0f];
    placehold_type.textColor = [UIColor grayColor];
    [self.scrollView addSubview:placehold_type];
    
    self.lbl_type = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(placehold_type.frame), CGRectGetMaxY(view_line.frame) + 15, (SCREEN_WIDTH - 30) / 2, 15)];
    self.lbl_type.text = @"打赏";
    self.lbl_type.textAlignment = NSTextAlignmentRight;
    self.lbl_type.textColor = [UIColor blackColor];
    self.lbl_type.font = [UIFont systemFontOfSize:16.0f];
    [self.scrollView addSubview:self.lbl_type];
    
    //当前状态
    UILabel * placehold_status = [[UILabel alloc] initWithFrame:CGRectMake(15, CGRectGetMaxY(placehold_type.frame) + 15, (SCREEN_WIDTH - 30) / 2, 15)];
    placehold_status.text = @"当前状态";
    placehold_status.font = [UIFont systemFontOfSize:16.0f];
    placehold_status.textColor = [UIColor grayColor];
    [self.scrollView addSubview:placehold_status];
    
    self.lbl_status = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(placehold_status.frame), CGRectGetMaxY(placehold_type.frame) + 15, (SCREEN_WIDTH - 30) / 2, 15)];
    self.lbl_status.text = @"已存入零钱";
    self.lbl_status.textAlignment = NSTextAlignmentRight;
    self.lbl_status.textColor = [UIColor blackColor];
    self.lbl_status.font = [UIFont systemFontOfSize:16.0f];
    [self.scrollView addSubview:self.lbl_status];
    
    
    //充值时间
    UILabel * placehold_time = [[UILabel alloc] initWithFrame:CGRectMake(15, CGRectGetMaxY(placehold_status.frame) + 15, (SCREEN_WIDTH - 30) / 2, 15)];
    placehold_time.text = @"充值时间";
    placehold_time.font = [UIFont systemFontOfSize:16.0f];
    placehold_time.textColor = [UIColor grayColor];
    [self.scrollView addSubview:placehold_time];
    
    self.lbl_time = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(placehold_time.frame), CGRectGetMaxY(placehold_status.frame) + 15, (SCREEN_WIDTH - 30) / 2, 15)];
    self.lbl_time.text = @"2016-12-30 20:21";
    self.lbl_time.textAlignment = NSTextAlignmentRight;
    self.lbl_time.textColor = [UIColor blackColor];
    self.lbl_time.font = [UIFont systemFontOfSize:16.0f];
    [self.scrollView addSubview:self.lbl_time];
    
    //支付方式
    UILabel * placehold_Payment = [[UILabel alloc] initWithFrame:CGRectMake(15, CGRectGetMaxY(placehold_time.frame) + 15, (SCREEN_WIDTH - 30) / 2, 15)];
    placehold_Payment.text = @"支付方式";
    placehold_Payment.font = [UIFont systemFontOfSize:16.0f];
    placehold_Payment.textColor = [UIColor grayColor];
    [self.scrollView addSubview:placehold_Payment];
    
    self.lbl_Payment = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(placehold_Payment.frame), CGRectGetMaxY(placehold_time.frame) + 15, (SCREEN_WIDTH - 30) / 2, 15)];
    self.lbl_Payment.text = @"来自零钱";
    self.lbl_Payment.textAlignment = NSTextAlignmentRight;
    self.lbl_Payment.textColor = [UIColor blackColor];
    self.lbl_Payment.font = [UIFont systemFontOfSize:16.0f];
    [self.scrollView addSubview:self.lbl_Payment];
    
    //交易单号
    UILabel * placehold_number = [[UILabel alloc] initWithFrame:CGRectMake(15, CGRectGetMaxY(placehold_Payment.frame) + 15, 70, 15)];
    placehold_number.text = @"交易单号";
    placehold_number.font = [UIFont systemFontOfSize:16.0f];
    placehold_number.textColor = [UIColor grayColor];
    [self.scrollView addSubview:placehold_number];
    
    self.lbl_number = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(placehold_number.frame), CGRectGetMaxY(placehold_Payment.frame) + 15, (SCREEN_WIDTH - 30 - 70), 15)];
    self.lbl_number.text = @"shjdhsjhdjshdjhsjhdj";
    self.lbl_number.textAlignment = NSTextAlignmentRight;
    self.lbl_number.textColor = [UIColor blackColor];
    self.lbl_number.font = [UIFont systemFontOfSize:16.0f];
    [self.scrollView addSubview:self.lbl_number];
}
















@end
